import { ISchema } from '@formily/react'

export const BraftEditor: ISchema = {
  type: 'object',
  properties: {
    disabled: {
      type: 'boolean',
      'x-decorator': 'FormItem',
      'x-component': 'Switch',
    },
    placeholder: {
      type: 'string',
      'x-decorator': 'FormItem',
      'x-component': 'Input',
      'x-component-props': {
        placeholder: '请输入内容',
      },
    },
    language: {
      type: 'string',
      enum: ['zh', 'en'],
      'x-decorator': 'FormItem',
      'x-component': 'Select',
      'x-component-props': {
        defaultValue: 'zh',
      },
    },
    contentStyle: {
      type: 'object',
      'x-decorator': 'FormItem',
      'x-component': 'StyleSetter',
      'x-component-props': {
        defaultValue: {
          height: '150px',
        },
      },
    },
  },
}
